<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>连续获取／发送文件（以不分块的方式 non-blocking）</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.ftp-mlsd.html">« ftp_mlsd</a></li>
      <li style="float: right;"><a href="function.ftp-nb-fget.html">ftp_nb_fget »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.ftp.html">FTP 函数</a></li>
    <li>连续获取／发送文件（以不分块的方式 non-blocking）</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.ftp-nb-continue" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ftp_nb_continue</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.3.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ftp_nb_continue</span> &mdash; <span class="dc-title">连续获取／发送文件（以不分块的方式 non-blocking）</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.ftp-nb-continue-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>ftp_nb_continue</strong></span>(<span class="methodparam"><span class="type">resource</span> <code class="parameter">$ftp_stream</code></span>): <span class="type">int</span></div>

  <p class="para rdfs-comment"> 
    以不分块的方式，连续获取/发送文件。
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.ftp-nb-continue-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">ftp_stream</code></dt>

     <dd>

      <p class="para">
        FTP 连接句柄。
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.ftp-nb-continue-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   返回 <strong><code>FTP_FAILED</code></strong> 或 <strong><code>FTP_FINISHED</code></strong>
   或 <strong><code>FTP_MOREDATA</code></strong>.
  </p>
 </div>

 <div class="refsect1 examples" id="refsect1-function.ftp-nb-continue-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-4277">
    <p><strong>示例 #1 <span class="function"><strong>ftp_nb_continue()</strong></span> 示例</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #FF8000">//&nbsp;Initiate&nbsp;the&nbsp;download<br /></span><span style="color: #0000BB">$ret&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">ftp_nb_get</span><span style="color: #007700">(</span><span style="color: #0000BB">$my_connection</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"test"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"README"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FTP_BINARY</span><span style="color: #007700">);<br />while&nbsp;(</span><span style="color: #0000BB">$ret&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">FTP_MOREDATA</span><span style="color: #007700">)&nbsp;{<br /><br />&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;Continue&nbsp;downloading...<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$ret&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">ftp_nb_continue</span><span style="color: #007700">(</span><span style="color: #0000BB">$my_connection</span><span style="color: #007700">);<br />}<br />if&nbsp;(</span><span style="color: #0000BB">$ret&nbsp;</span><span style="color: #007700">!=&nbsp;</span><span style="color: #0000BB">FTP_FINISHED</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"There&nbsp;was&nbsp;an&nbsp;error&nbsp;downloading&nbsp;the&nbsp;file..."</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;exit(</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>

</div></div></div></body></html>